package io;

import java.io.File;
import java.io.IOException;

public class Demo04 {
    public static void main(String[] args) throws IOException {
        File f = new File("D:/test.text");
        f.createNewFile();
        File f2 = new File("D:/test2.text");
        f.renameTo(f2);
    }
}
